﻿//文件指定编译编码UTF-8
#pragma execution_character_set("utf-8")

/**
*
* @file:    mainservice.h
* @brief:
* @author:  sanshi522@163.com
* @date:    2024-10-31  20:17
*
*
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License along
*  with this program; if not, write to the Free Software Foundation, Inc.,
*  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/

#ifndef MAINSERVICE_H
#define MAINSERVICE_H

#include <qtservice.h>
#include <servicecenter.h>

class MainService : public QtService<QCoreApplication>
{
public:
    MainService(int argc, char *argv[]);
    ~MainService();
protected:
    /* 开启服务 */
    virtual void start() override;

    /* 停止服务 */
    virtual void stop() override;

    /* 暂停服务 */
    virtual void pause() override;

    /* 重启服务 */
    virtual void resume() override;
private:
    bool isStart;
    ServiceCenter *serviceCenter;
};

#endif // MAINSERVICE_H
